package com.eduhzy.ttw.teacher.mvp.model;

import com.eduhzy.ttw.commonsdk.entity.CommonData;
import com.eduhzy.ttw.teacher.mvp.contract.ContactContract;
import com.eduhzy.ttw.teacher.mvp.model.api.Api;
import com.eduhzy.ttw.teacher.mvp.model.entity.ChildAreaData;
import com.jess.arms.di.scope.FragmentScope;
import com.jess.arms.integration.IRepositoryManager;
import com.jess.arms.mvp.BaseModel;

import java.util.Map;

import javax.inject.Inject;

import io.reactivex.Observable;

/**
 * @author xubo
 * @date 2018-7-20 14:48:38
 */
@FragmentScope
public class ContactModel extends BaseModel implements ContactContract.Model {


    @Inject
    public ContactModel(IRepositoryManager repositoryManager) {
        super(repositoryManager);
    }

    @Override
    public Observable<CommonData<ChildAreaData[]>> getChildArea(Map<String, Object> map) {
        return mRepositoryManager.obtainRetrofitService(Api.class).getChildArea(map);
    }
}